SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 65468: A Microsoft Excel formula within a text string appears as text only in an Excel file if the string is in a DATA step with the ODS Excel destination

DetailsAboutRate It

Formulas within a string that are generated by the DATA step or the ODS Report Writing Interface and that use the ODS Excel destination do not appear correctly in the resulting Excel file. When the length of the string including the formula is greater than 61 characters in the code, the entire string appears as text only, rather than a resolved formula, in the Excel file.

The syntax shown below would introduce this problem:

data one;
var1='=CONCATENATE("really long string that calculates 1+1=", SUM(1,1))';
run;
ods excel;

The workaround is to add the string containing the formula through the PRINT procedure or the REPORT procedure.

Here is an example of a workaround with PROC PRINT:

proc print data=one;
run;
proc print data=one;
var var1 /style(data)={tagattr='formula:=CONCATENATE("really long string that calculates 1+1=", SUM(1,1))'};
run;
​​​​​​​ods excel close;


Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASz/OS9.4_M39.4_M79.4 TS1M39.4 TS1M7
z/OS 64-bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft® Windows® for x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8 Enterprise 32-bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8 Enterprise x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8 Pro 32-bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8 Pro x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8.1 Enterprise 32-bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8.1 Enterprise x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8.1 Pro 32-bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 8.1 Pro x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows 109.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows Server 20089.4_M39.4 TS1M3
Microsoft Windows Server 2008 R29.4_M39.4 TS1M3
Microsoft Windows Server 2008 for x649.4_M39.4 TS1M3
Microsoft Windows Server 2012 Datacenter9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows Server 2012 R2 Datacenter9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows Server 2012 R2 Std9.4_M39.4_M79.4 TS1M39.4 TS1M7
Microsoft Windows Server 2012 Std9.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Enterprise 32 bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Enterprise x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Home Premium 32 bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Home Premium x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Professional 32 bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Professional x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Ultimate 32 bit9.4_M39.4_M79.4 TS1M39.4 TS1M7
Windows 7 Ultimate x649.4_M39.4_M79.4 TS1M39.4 TS1M7
64-bit Enabled AIX9.4_M39.4_M79.4 TS1M39.4 TS1M7
64-bit Enabled Solaris9.4_M39.4_M79.4 TS1M39.4 TS1M7
HP-UX IPF9.4_M39.4_M79.4 TS1M39.4 TS1M7
Linux for x649.4_M39.4_M79.4 TS1M39.4 TS1M7
Solaris for x649.4_M39.4_M79.4 TS1M39.4 TS1M7
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.